<?php $this->_extends('_layouts/main_layout'); ?>

<?php $this->_block('title'); ?>
Leader Board - MommyMoolah
<?php $this->_endblock(); ?>

<?php $this->_block('keywords');?>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('description');?>
<meta name="description" content="MommyMoolah: win cash prizes for playing our games." />
<?php $this->_endblock();?>

<?php $this->_block('content'); ?>
<div class="mm createaccount">
	<div class="topad">
		<?php if (!empty($user)) {?>
		<?php echo str_replace('[[USER_ID]]', $user['id'], $site['ad_top']);?>
		<?php }?>
	</div>
	<div class="clear" style="height: 10px"></div>
	<div class="left" style="width: 600px;">
		<div class="title">Leaderboard</div>
		<div class="clear"></div>
		<div class="bold">
			<p>
				Below are the daily, weekly, monthly and all-time cash leaders at
				<?php echo $site['name'];?>
				. If you don't see your name on the leaderboard, keep playing and
				with a bit of luck, your name will be on the leaderboard in no time!
			</p>
		</div>
		<div class="clear"></div>
		<div id="tabs">
			<div class="tab" id="leaderBoards">
				<div class="item on" id="todayLeadersTab">Today</div>
				<div class="item off" id="weeklyLeadersTab">Weekly</div>
				<div class="item off" id="monthlyLeadersTab">Monthly</div>
				<div class="item off" id="allLeadersTab">All Time</div>
				<div class="clear"></div>
			</div>
			<div class="frame">
				<div class="t"></div>
				<div class="m">
					<div class="body left">
						<div class="tabs">
							<div class="th">
								<div class="lsqr left"></div>
								<div class="td" style="width: 120px;">Rank</div>
								<div class="td" style="width: 90px;">Name</div>
								<div class="td" style="width: 200px;">Location</div>
								<div class="td last" style="width: 132px;">Winnings</div>
								<div class="rsqr left"></div>
								<div class="clear"></div>
							</div>
							<?php
							if(isset($todayLeaders)){
								$todayLeadersLen = count($todayLeaders);
								for($i = 0; $i < $todayLeadersLen; $i++){
									?>

							<div class="tr todayLeaders">
								<div class="lsqr left"></div>
								<div class="td" style="width: 120px;">
								<?php echo $i+1; ?>
								</div>
								<div class="td" style="width: 90px;">
								<?php echo $todayLeaders[$i]['username']; ?>
								</div>
								<div class="td" style="width: 200px;">
								<?php echo $todayLeaders[$i]['location']; ?>
								</div>
								<div class="td last" style="width: 132px;">
									$
									<?php echo $todayLeaders[$i]['daily']; ?>
								</div>
								<div class="rsqr left"></div>
								<div class="clear"></div>
							</div>
							<?php
								}
							}
							?>
							<?php
							if(isset($weeklyLeaders)){
								$weeklyLeadersLen = count($weeklyLeaders);
								for($i = 0; $i < $weeklyLeadersLen; $i++){
									?>

							<div class="tr weeklyLeaders hidden">
								<div class="lsqr left"></div>
								<div class="td" style="width: 120px;">
								<?php echo $i+1; ?>
								</div>
								<div class="td" style="width: 90px;">
								<?php echo $weeklyLeaders[$i]['username']; ?>
								</div>
								<div class="td" style="width: 200px;">
								<?php echo $weeklyLeaders[$i]['location']; ?>
								</div>
								<div class="td last" style="width: 132px;">
									$
									<?php echo $weeklyLeaders[$i]['weekly']; ?>
								</div>
								<div class="rsqr left"></div>
								<div class="clear"></div>
							</div>
							<?php
								}
							}
							?>
							<?php
							if(isset($monthlyLeaders)){
								$monthlyLeadersLen = count($monthlyLeaders);
								for($i = 0; $i < $monthlyLeadersLen; $i++){
									?>

							<div class="tr monthlyLeaders hidden">
								<div class="lsqr left"></div>
								<div class="td" style="width: 120px;">
								<?php echo $i+1; ?>
								</div>
								<div class="td" style="width: 90px;">
								<?php echo $monthlyLeaders[$i]['username']; ?>
								</div>
								<div class="td" style="width: 200px;">
								<?php echo $monthlyLeaders[$i]['location']; ?>
								</div>
								<div class="td last" style="width: 132px;">
									$
									<?php echo $monthlyLeaders[$i]['monthly']; ?>
								</div>
								<div class="rsqr left"></div>
								<div class="clear"></div>
							</div>
							<?php
								}
							}
							?>
							<?php
							if(isset($allLeaders)){
								$allLeadersLen = count($allLeaders);
								for($i = 0; $i < $allLeadersLen; $i++){
									?>

							<div class="tr allLeaders hidden">
								<div class="lsqr left"></div>
								<div class="td" style="width: 120px;">
								<?php echo $i+1; ?>
								</div>
								<div class="td" style="width: 90px;">
								<?php echo $allLeaders[$i]['username']; ?>
								</div>
								<div class="td" style="width: 200px;">
								<?php echo $allLeaders[$i]['location']; ?>
								</div>
								<div class="td last" style="width: 132px;">
									$
									<?php echo $allLeaders[$i]['won']; ?>
								</div>
								<div class="rsqr left"></div>
								<div class="clear"></div>
							</div>
							<?php
								}
							}
							?>
							<div class="foot"></div>
						</div>
					</div>
					<div class="scrollbar right">
						<div style="height: 580px;"></div>
					</div>
					<div class="clear"></div>
				</div>
				<div class="b"></div>
			</div>
		</div>
	</div>
	<div class="right rightad">
		<?php $this->_element('rightad');?>
	</div>
	<div class="clear" style="height: 30px;"></div>
	<div class="bottomad">
		<?php if (!empty($user)) { ?>
		<?php echo $site['ad_bottom']; ?>
		<?php } ?>
	</div>
</div>
<div class="mb"></div>
<?php $this->_endblock(); ?>